package com.studio.app.dao.imp;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.studio.app.dao.NavigationDao;
import com.studio.app.model.Navigation;

@Repository
public class NavigationDaoImp extends BaseDaoImp implements NavigationDao{

	@Override
	public List<Navigation> findAllNavigation() {
		return this.getHibernateTemplate().find("from Navigation ");
	}

	@Override
	public Navigation findNavigationById(int navigationId) {
		return this.getHibernateTemplate().load(Navigation.class, navigationId);
	}

//	@Override
//	public int getPK() {
//		return this.getPK("select max(navigationId) from Navigation");
//	}

	@Override
	public List<Navigation> findAllHiddenNavigation(String hidden) {
		return this.getHibernateTemplate().find("from Navigation where navigationHidden='"+hidden+"'");
	}

}
